include ../mixins/image.pug

link(rel="stylesheet", href="/public/css/index.css")

mixin swipe-inner-card(title, subtitle)
  .swipe-inner-card
    .ui-mx-auto.swipe-inner-card-content
      div(style="height: .16rem;")
      .bs-text-color-black.text-sz-18.ui-line-height-rem-24 #{title}
      div(style="height: .08rem;")
      .text-color-gray.text-sz-14.ui-line-height-1 #{subtitle}
      div(style="height: .14rem;")
    .btn.ui-mx-auto.ui-rounded.swipe-inner-card-btn.ui-center.ui-line-height-rem-32
      span.bs-text-color-white.text-sz-16 立即查看


+swipe-inner-card("2021考研专业课一对一名 班(211/985)", "专业课150分")

mixin recomend-card(bgcolor, bgurl)
  .recomend-card.ui-relative
    +simage(bgurl, "100%", "")(class="recomend-card-bg")
    .recomend-card-content.ui-full-w
      div(style="height: .3rem;")
      .ui-mx-auto(style="width: 2.4rem")
        .bs-text-color-black.text-sz-18 2021考研蜕变计划标准班标准 蜕变计划标准班标准
        div(style="height: .1rem;")
        .text-color-gray.text-sz-14 张雪峰 杨超 屠皓民
        div(style="height: .28rem;")
        .btn.recomend-card-btn(style="background-color: " + bgcolor)
          .bs-text-color-white.text-sz-12.ui-center 立即查看
    .recomend-card-img &nbsp;

.ui-flex
  +recomend-card("#13BE6F", "https://oss.kaoyanvip.cn/uploads/file1595031732747.png")
  +recomend-card("#3C6EFC", "https://oss.kaoyanvip.cn/uploads/file1595031561100.png")
  +recomend-card("#3C6EFC", "https://oss.kaoyanvip.cn/uploads/file1595030684451.png")
  +recomend-card("#F2456B", "https://oss.kaoyanvip.cn/uploads/file1595031626294.png")


div(style="height: .2rem;")

#trial_lesson.activity-trial-lesson
  .app-container.ui-mx-auto.ui-full-h
    .ui-flex.ui-items-center.ui-full-h
      div.ui-relative.activity-trial-lesson-logo.ui-full-h(style="width: 1.94rem")
        +simage('https://oss.kaoyanvip.cn/uploads/file1595028558154.png')
      .ui-flex.ui-items-center.ui-full-h.ui-line-height-1
        div.bs-text-color-white.text-sz-24 免费领取价值
        div.text-sz-30(style="color: #FFF43E") 299元
        div.bs-text-color-white.text-sz-24  试听体验
      div(style="width: .4rem") &nbsp;
      #trial_lesson_search.ui-flex.ui-items-center.activity-trial-lesson-search.ui-relative
        div(style="width: .19rem") &nbsp;
        +simage("https://oss.kaoyanvip.cn/uploads/file1595028064907.png", ".17rem", "")
        div(style="width: .06rem") &nbsp;
        input(id="trial_lesson_input", placeholder="请输入您的手机号", maxlength="11", style="width: 2.7rem", required="")
        #trial_lesson_submit.ui-absolute.activity-trial-lesson-btn.ui-flex.ui-items-center.ui-justify-center.ui-cus-pointer
          .text-sz-18(style="color: #E04300") 立即领取
      div(style="width: .87rem") &nbsp;
      +simage('https://oss.kaoyanvip.cn/uploads/file1595028468291.png')(id="trial_lesson_close", class="ui-cus-pointer")

script.
  $('#trial_lesson_submit').on('click', function () {
    var search = $('#trial_lesson_search')
    var input = $('#trial_lesson_input')
    var val = input.val()
    if (!val) {
      search.addClass('is-invalid')
    } else {
      search.removeClass('is-invalid')
    }
  })
  $("#trial_lesson_close").on('click', function () {
    $("#trial_lesson").hide();
  })





